package com.efuture.jdbctemplate;

import com.efuture.druid.DruidUtils;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @ClassNAME JdbcTemplateAddDate
 * @Description 使用JdbcTemplate向emp表添加一条记录
 * @Author zhaoshanshan
 * @Date 2021/9/20 9:35 下午
 * @Version 1.0
 */
public class JdbcTemplateAddDate {

    public static void main(String[] args) {
        try {
            JdbcTemplate jdbcTemplate = new JdbcTemplate(DruidUtils.getDataSource());
            String sql = "insert into emp values(?,?,?,?,?,?,?,?)";
            jdbcTemplate.update(sql,1015,"zhanshan",4,1007,"2021-09-20",10000,10000,10);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}